package cn.iocoder.yudao.module.system.dal.mysql.workstorepallet;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.workstorepallet.WorkStorePalletDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.workstorepallet.vo.*;

/**
 * 入库托数记录 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface WorkStorePalletMapper extends BaseMapperX<WorkStorePalletDO> {

    default PageResult<WorkStorePalletDO> selectPage(WorkStorePalletPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WorkStorePalletDO>()
                .eqIfPresent(WorkStorePalletDO::getWorkId, reqVO.getWorkId())
                .eqIfPresent(WorkStorePalletDO::getStoreId, reqVO.getStoreId())
                .eqIfPresent(WorkStorePalletDO::getBoxNum, reqVO.getBoxNum())
                .eqIfPresent(WorkStorePalletDO::getIncomingNum, reqVO.getIncomingNum())
                .eqIfPresent(WorkStorePalletDO::getBoxesNum, reqVO.getBoxesNum())
                .betweenIfPresent(WorkStorePalletDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(WorkStorePalletDO::getId));
    }

}